#include<stdio.h>
#include<string.h>
int len(char *sp)
{
	int len = 0;
	while(*sp!='\0')
	{
		if(*sp!=' ') {
		len++;
		}
		sp++;
	}
	return len;
}
int main()
{
	char str[101];
	fgets(str,sizeof(str),stdin);
	str[strcspn(str,"\n")] = '\0';
	int length = len(str);
	printf("%d\n",length);
	return 0;
}
